package com.cloud.controller;



import com.cloud.dao.TOrderMapper;
import com.cloud.entity.TOrder;
import com.cloud.service.OrderHandler;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;


@Slf4j
@RestController
public class OrderController {

    @Resource
    OrderHandler handler;

    @RequestMapping(value = "/order/create")
    public String create() {
        String message = "创建订单成功！";
        TOrder order = new TOrder();
        order.setCount(0);
        handler.createOrder(order);
        return message;
    }
}

